<?php
declare (strict_types = 1);

namespace app\common\validate;

use think\Validate;
class StudentReplaceDiaper extends Validate
{
    protected $rule = ['student_id' => 'require|number','replace_diaper' => 'require','diaper_type' => 'require','replace_info' => 'require','add_time' => 'require|number',
    ];

    protected $message = ['student_id.require' => '学生ID为必填项','student_id.number' => '学生ID需为数字','replace_diaper.require' => '更换尿布:是|否为必填项','diaper_type.require' => '正常|红屁股为必填项','replace_info.require' => '特别说明为必填项','add_time.require' => '发布时间为必填项','add_time.number' => '发布时间需为数字',
    ];

    /**
     * 添加
     */
    public function sceneAdd()
    {
        return $this->only(['student_id','replace_diaper','diaper_type','replace_info','add_time',]);
    }

    /**
     * 编辑
     */
    public function sceneEdit()
    {
        return $this->only(['student_id','replace_diaper','diaper_type','replace_info','add_time',]);
    }
}
